<!DOCTYPE html>
<html>
   <head>
      <title>二维码生成系统</title>
      <meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
      <meta name="viewport" content="width=device-width, initial-scale=1.0 Access-Control-Allow-Origin">
      <!-- 引入 Bootstrap -->
      <!--<link href="<?=base_url('html/bootstrap_v3/css/bootstrap.css')?>" rel="stylesheet">-->
      <link href="<?=  base_url('/html/bootstrap_v3/css/bootstrap.css')?>" rel="stylesheet">
      <link href="<?=base_url('html/bootstrap_v3/datepicker/css/bootstrap-datetimepicker.min.css')?>" rel="stylesheet">
      <script src="<?=base_url('html/js/jquery-1.8.3.min.js')?>"></script>
      <script src="<?=base_url('html/bootstrap_v3/js/bootstrap.min.js')?>"></script>
      <script src="<?=base_url('html/bootstrap_v3/datepicker/js/bootstrap-datetimepicker.js')?>"></script>
      <script src="<?=base_url('html/bootstrap_v3/datepicker/js/locales/bootstrap-datetimepicker.zh-CN.js')?>"></script>
      <script>
      $('.goDate').datetimepicker({
        language: 'zh-CN',
        weekStart: 1,
        todayBtn: 1,
        autoclose: 1,
        todayHighlight: 1,
        startView: 2,
        forceParse: 0,
        showMeridian: 1
      });
      </script>
      
      <!-- HTML5 Shim 和 Respond.js 用于让 IE8 支持 HTML5元素和媒体查询 -->
      <!-- 注意： 如果通过 file://  引入 Respond.js 文件，则该文件无法起效果 -->
      <!--[if lt IE 9]>
         <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
         <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
      <![endif]-->
   </head>
   <body>
      <div class="container">
      <form action="" class="form-horizontal" role="form">
        <fieldset>
          <legend class="text-center" style="font-weight:bold;font-size:2em;">
            二维码生成系统
          </legend> 
            <div class="form-group baogongFinish">
                          <div class="input-group col-xs-12 span12">
                              <input type="text" class="form-control" rows="2" id="content" placeholder="请输入生成二维码的信息">
                              <button type="button" class="btn btn-primary btn-block btn-lg backbutton submit" style="margin-top: 20px">
                                确定
                                </button>
                          </div>
                          <div id="image" class="text-center" style="margin-top: 40px;">
                              
                          </div>
                            
            </div>
            
    </fieldset>
    </form>
    </div>
    <script type="text/javascript">
        $(document).ready(function(){
            $('.submit').click(function(){
                var content;
                content = $("#content").val();
                $.ajax({
                    type:"GET",
                    url:"<?=  base_url()?>/qrcodeoutput/qrcode?content="+content,
                    success:function(data){
                        $("#image").html();
                        $("#image").html("<img src='html/images/logoqrcode/"+data+".png'>");
                    },
                    error:function(XMLHttpRequest, textStatus, errorThrown){
                        //console.log(XMLHttpRequest);
                        //console.log(textStatus);
                        //console.log(errorThrown);
                    }
                });
            });
        });
    </script>
   </body>
</html>